Repository navigation
zero-swift: client and storage fixes from the bug sweep - #13
Merged
Merged
Conversation
Amp-Thread-ID: https://ampcode.com/threads/T-c513a037-a257-45e0-b9a9-15c15edfe859 Co-authored-by: tmm <tmm@tmm.dev>
…itative As in zero.ts, the poke callback marks the got queries authoritative after rep.poke, even when the poke is a no-op, if the socket it came on is still the current one. An empty first poke after a reconnect or relaunch left views and preloads incomplete. Amp-Thread-ID: https://ampcode.com/threads/T-c513a037-a257-45e0-b9a9-15c15edfe859 Co-authored-by: tmm <tmm@tmm.dev>
JS compareValues returns a - b, which is NaN for a NaN operand, so <= and >= are false. compare keeps its total order for sorting. Amp-Thread-ID: https://ampcode.com/threads/T-c513a037-a257-45e0-b9a9-15c15edfe859 Co-authored-by: tmm <tmm@tmm.dev>
…are retried - Every client sharing a ReplicaDatabase hears about a write failure; a closed client is removed. - SQLiteStore stops writing at the first failure, so writes queued before it don't land after it. - SQLITE_BUSY/LOCKED is not a storage failure (classifySQLiteError): the ops are kept and written with the next write. - A read failure loading the client group in initClient is reported and moves the client to memory, as for a failed open. - The memory fallback after a failed open is shared by name, like .memory (fallbackStoreProvider, MemStore). - Drop the two SweepStorageTests for active clients, fixed on another branch. Amp-Thread-ID: https://ampcode.com/threads/T-c513a037-a257-45e0-b9a9-15c15edfe859 Co-authored-by: tmm <tmm@tmm.dev>
macOS rejects DispatchSemaphore.wait() in an async context. Amp-Thread-ID: https://ampcode.com/threads/T-c513a037-a257-45e0-b9a9-15c15edfe859 Co-authored-by: tmm <tmm@tmm.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes bugs found by the bug sweep. Each expected behavior was established from JS, and each test fails without its fix.
.cachedandrun(.complete)/preload.completehung. It now marks them, behind the same socket guard as JS.<=and>=filters no longer match NaN.compareis unchanged, since sorting needs a total order.classifySQLiteError).onStorageFailure, as an open failure is..memory.Also keeps the sweep's seeded IVM fuzz generator and its curated cases.
Checked: 191 Swift tests,
swift format lint --strict, andClientE2ETestsagainst a real zero-cache.